package com.blog.service.imp.active;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.blog.dao.active.ActiveTypeDao;
import com.blog.entity.active.ActiveType;
import com.blog.service.active.ActiveTypeService;
 

@Service
public class ActiveTypeServiceImp  implements ActiveTypeService{
	
	@Autowired
	private ActiveTypeDao dao;
	
	@Override
	public Integer saveActiveType(ActiveType at) {
		at.setState(1);
		at.setCreateTime(new Date());
		at.setUpdateTime(new Date());
		return dao.saveActiveType(at);
	}

	@Override
	public Integer updateActiveType(ActiveType at) {
		return dao.updateActiveType(at);
	}

	@Override
	public List<ActiveType> listAllActiveType(Map<String, Object> map) {
		return dao.listAllActiveType(map);
	}

	@Override
	public List<ActiveType> listActiveTypeByIn(String activeTypeIds) {
		return dao.listActiveTypeByIn(activeTypeIds);
	}

	@Override
	public ActiveType selectActiveTypeById(Integer activeTypeId) {
		return dao.selectActiveTypeById(activeTypeId);
	}

}
